import java.util.Timer;
import java.util.TimerTask;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-05-10
 * Time: 22:17
 */
public class ThreadDemo19 {
    public static void main(String[] args) {
        //1.创建 timer 对象
        Timer timer = new Timer();
        //2. 设定时间
        timer.schedule(new TimerTask() {
            @Override
            public void run() {

                System.out.println("hello1!");
            }
        },4000);
    }
}
